<template>
  <div class="parser-header">
    <div class="header-content">
      <h2 class="header-title">{{ title }}</h2>
      <div class="header-actions">
        <el-button 
          type="primary" 
          size="small" 
          @click="$emit('refresh')" 
          :loading="loading"
        >
          <el-icon><Refresh /></el-icon>
          Refresh
        </el-button>
      </div>
    </div>
  </div>
</template>

<script>
import { Refresh } from '@element-plus/icons-vue'

export default {
  name: 'ParserHeader',
  components: {
    Refresh
  },
  props: {
    title: {
      type: String,
      default: 'Parser'
    },
    loading: {
      type: Boolean,
      default: false
    }
  },
  emits: ['refresh']
}
</script>

<style scoped>
.parser-header {
  padding: 16px;
  background-color: var(--el-bg-color);
  border-bottom: 1px solid var(--el-border-color-light);
  margin-bottom: 16px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--el-text-color-primary);
}

.header-actions {
  display: flex;
  gap: 8px;
}
</style> 